<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>

<form class="layui-form" lay-filter="tmForm" id="add_tm_form" action="" style="padding:15px 10px;">
    <input type="hidden" name="tMid">
    <!--<input type="hidden" name="photo" id="photo" class="layui-input">-->
    <div class="layui-form-item">
        <label class="layui-form-label">学期年份</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="tMyear" placeholder="请选择日期" id="tMyear">
            <!--<input type="text" name="tMyear" required  lay-verify="required" placeholder="请输入学期月份" autocomplete="off" class="layui-input">-->
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">学期类型</label>
        <div class="layui-input-block" >
            <select name="did" id="did"> <!--xm-select="roles2" xm-select-direction="down"-->
                <option value="-1">请选择</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">收费月份</label>
        <div class="layui-input-block">
            <input type="text" id="feeM" name="feeM" class="layui-input">
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">考勤开始日期</label>
        <div class="layui-input-block" id="fuji">
            <!-- <input type="date" name="abegins">-->
            <input type="text" id="abegins" name="abegins" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">考勤结束日期</label>
        <div class="layui-input-block" id="fuji2">
            <!--<input type="date" name="end">-->
            <input type="text" id="end" name="end" class="layui-input">
        </div>
    </div>

    <script src="../../js/laydate.js"></script>

    <script>
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#tMyear'
                ,type: 'year'
            });

            laydate.render({
                elem: '#feeM'
                ,type: 'month'
                ,range: true
            });
            laydate.render({
                elem: '#abegins'
            });
            laydate.render({
                elem: '#end'
            });
        });
    </script>
    <script>
        layui.form.render();
        $.get("http://localhost:9999/Dictionary/index",function(data){
            $.each(data,function(){
                var opt = $("<option></option>").appendTo("#did");
                opt.text(this.name).val(this.did);
            });
            layui.form.render();
        });

    </script>
</form>
</body>
</html>